package com.gills.weather.controller;



import com.baomidou.mybatisplus.extension.api.ApiController;
import com.baomidou.mybatisplus.extension.api.R;
import com.gills.weather.entity.WindDirection;
import com.gills.weather.service.WindDirectionService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * (WindDirection)表控制层
 *
 * @author makejava
 * @since 2024-11-12 19:18:29
 */
@RestController
@RequestMapping("windDirection")
public class WindDirectionController extends ApiController {
    /**
     * 服务对象
     */
    @Resource
    private WindDirectionService windDirectionService;

    /**
     * 新增数据
     *
     * @param windDirection 实体对象
     * @return 新增结果
     */
    @PostMapping
    public R insert(@RequestBody WindDirection windDirection) {
        return success(this.windDirectionService.save(windDirection));
    }


    /**
     * 删除数据
     *
     * @param idList 主键结合
     * @return 删除结果
     */
    @DeleteMapping
    public R delete(@RequestParam("idList") List<Long> idList) {
        return success(this.windDirectionService.removeByIds(idList));
    }
}

